package com.java2110.controller;

import com.java2110.dto.OptionsDTO;
import com.java2110.entity.Options;
import com.java2110.service.OptionsService;
import com.java2110.utils.PageUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author admin
 * @since 2025-05-2025/5/23 14:19
 */
@RestController
@RequestMapping("/options")
public class OptionsController {
    @Autowired
    private OptionsService optionsService;
    @GetMapping("/find")
    public PageUtils<Options> find(OptionsDTO optionsDTO){
        return optionsService.find(optionsDTO);
    }
    @GetMapping("/{id}")
    public List<Options> findById(@PathVariable("id") Integer id){
        return optionsService.findById(id);
    }
}
